package com.ccx.coachsite.model;

import java.util.HashMap;

public class CSResultCodeMap {

	public static final int APP_SUCCESS_CODE = 200;
	public static final int SOFT_TOPIC_FAIL_CODE = 821;
	public static final int SOFT_CATEGORY_LIST_FAIL_CODE = 801;
	
	//短信分享
	public static final int SHARE_SMS_CODE_1011 = 1011;
	public static final int SHARE_SMS_CODE_1012 = 1012;
	public static final int SHARE_SMS_CODE_1013 = 1013;
	public static final int SHARE_SMS_CODE_1014 = 1014;
	public static final int SHARE_SMS_CODE_1015 = 1015;
	public static final int SHARE_SMS_CODE_1016 = 1016;
	public static final int SHARE_SMS_CODE_1017 = 1017;
	public static final int SHARE_SMS_CODE_1018 = 1018;
	public static final int SHARE_SMS_CODE_1019 = 1019;	
		
	private static HashMap<Integer,String> resultCodeMap = new HashMap<Integer,String>();
	
	static {
		resultCodeMap.put(APP_SUCCESS_CODE, "成功");
		resultCodeMap.put(SOFT_TOPIC_FAIL_CODE, "失败，未知异常");
		resultCodeMap.put(SOFT_CATEGORY_LIST_FAIL_CODE, "失败，未知异常");
		
		resultCodeMap.put(SHARE_SMS_CODE_1011, "短信分享，手机号或分组为空");
		resultCodeMap.put(SHARE_SMS_CODE_1012, "短信分享，手机号不合法");
		resultCodeMap.put(SHARE_SMS_CODE_1013, "短信分享，用户ID为空");
		resultCodeMap.put(SHARE_SMS_CODE_1014, "短信分享失败");
		resultCodeMap.put(SHARE_SMS_CODE_1015, "短信分享，系统错误");
		resultCodeMap.put(SHARE_SMS_CODE_1016, "短信分享，用户类型为空");
		resultCodeMap.put(SHARE_SMS_CODE_1017, "分享类型为空");
		resultCodeMap.put(SHARE_SMS_CODE_1018, "教程或应用的ID");
		resultCodeMap.put(SHARE_SMS_CODE_1019, "用户拒绝接受短信");
	}
	
	public static String getCodeDesc(int resultCode){
		String resultStr = resultCodeMap.get(resultCode);
		if ( resultStr!=null )
			return resultStr;
		return "访问服务发生未知异常!";
	}
}
